Optimal. Leaf size=531 \[ -\frac{x \left (-3 c e^2 g^2 \left (a^2 e^2 g^2-2 a b e g (d g+e f)+b^2 \left (d^2 g^2+d e f g+e^2 f^2\right )\right )+b^2 e^3 g^3 (-3 a e g+b d g+b e f)-3 c^2 e g \left (a e g \left (d^2 g^2+d e f g+e^2 f^2\right )-b \left (d^2 e f g^2+d^3 g^3+d e^2 f^2 g+e^3 f^3\right )\right )+c^3 \left (-\left (d^2 e^2 f^2 g^2+d^3 e f g^3+d^4 g^4+d e^3 f^3 g+e^4 f^4\right )\right )\right )}{e^5 g^5}+\frac{c x^3 \left (-3 c e g (-a e g+b d g+b e f)+3 b^2 e^2 g^2+c^2 \left (d^2 g^2+d e f g+e^2 f^2\right )\right )}{3 e^3 g^3}+\frac{x^2 \left (-3 c^2 e g \left (a e g (d g+e f)-b \left (d^2 g^2+d e f g+e^2 f^2\right )\right )-3 b c e^2 g^2 (-2 a e g+b d g+b e f)+b^3 e^3 g^3+c^3 \left (-\left (d^2 e f g^2+d^3 g^3+d e^2 f^2 g+e^3 f^3\right )\right )\right )}{2 e^4 g^4}+\frac{\log (d+e x) \left (a e^2-b d e+c d^2\right )^3}{e^6 (e f-d g)}-\frac{\log (f+g x) \left (a g^2-b f g+c f^2\right )^3}{g^6 (e f-d g)}-\frac{c^2 x^4 (-3 b e g+c d g+c e f)}{4 e^2 g^2}+\frac{c^3 x^5}{5 e g} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.988291, antiderivative size = 531, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 27, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.037, Rules used = {893} \[ -\frac{x \left (-3 c e^2 g^2 \left (a^2 e^2 g^2-2 a b e g (d g+e f)+b^2 \left (d^2 g^2+d e f g+e^2 f^2\right )\right )+b^2 e^3 g^3 (-3 a e g+b d g+b e f)-3 c^2 e g \left (a e g \left (d^2 g^2+d e f g+e^2 f^2\right )-b \left (d^2 e f g^2+d^3 g^3+d e^2 f^2 g+e^3 f^3\right )\right )+c^3 \left (-\left (d^2 e^2 f^2 g^2+d^3 e f g^3+d^4 g^4+d e^3 f^3 g+e^4 f^4\right )\right )\right )}{e^5 g^5}+\frac{c x^3 \left (-3 c e g (-a e g+b d g+b e f)+3 b^2 e^2 g^2+c^2 \left (d^2 g^2+d e f g+e^2 f^2\right )\right )}{3 e^3 g^3}+\frac{x^2 \left (-3 c^2 e g \left (a e g (d g+e f)-b \left (d^2 g^2+d e f g+e^2 f^2\right )\right )-3 b c e^2 g^2 (-2 a e g+b d g+b e f)+b^3 e^3 g^3+c^3 \left (-\left (d^2 e f g^2+d^3 g^3+d e^2 f^2 g+e^3 f^3\right )\right )\right )}{2 e^4 g^4}+\frac{\log (d+e x) \left (a e^2-b d e+c d^2\right )^3}{e^6 (e f-d g)}-\frac{\log (f+g x) \left (a g^2-b f g+c f^2\right )^3}{g^6 (e f-d g)}-\frac{c^2 x^4 (-3 b e g+c d g+c e f)}{4 e^2 g^2}+\frac{c^3 x^5}{5 e g} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 893
Rubi steps
\begin{align*} \int \frac{\left (a+b x+c x^2\right )^3}{(d+e x) (f+g x)} \, dx &=\int \left (\frac{-b^2 e^3 g^3 (b e f+b d g-3 a e g)+c^3 \left (e^4 f^4+d e^3 f^3 g+d^2 e^2 f^2 g^2+d^3 e f g^3+d^4 g^4\right )+3 c e^2 g^2 \left (a^2 e^2 g^2-2 a b e g (e f+d g)+b^2 \left (e^2 f^2+d e f g+d^2 g^2\right )\right )+3 c^2 e g \left (a e g \left (e^2 f^2+d e f g+d^2 g^2\right )-b \left (e^3 f^3+d e^2 f^2 g+d^2 e f g^2+d^3 g^3\right )\right )}{e^5 g^5}+\frac{\left (b^3 e^3 g^3-3 b c e^2 g^2 (b e f+b d g-2 a e g)-c^3 \left (e^3 f^3+d e^2 f^2 g+d^2 e f g^2+d^3 g^3\right )-3 c^2 e g \left (a e g (e f+d g)-b \left (e^2 f^2+d e f g+d^2 g^2\right )\right )\right ) x}{e^4 g^4}+\frac{c \left (3 b^2 e^2 g^2-3 c e g (b e f+b d g-a e g)+c^2 \left (e^2 f^2+d e f g+d^2 g^2\right )\right ) x^2}{e^3 g^3}-\frac{c^2 (c e f+c d g-3 b e g) x^3}{e^2 g^2}+\frac{c^3 x^4}{e g}+\frac{\left (c d^2-b d e+a e^2\right )^3}{e^5 (e f-d g) (d+e x)}+\frac{\left (c f^2-b f g+a g^2\right )^3}{g^5 (-e f+d g) (f+g x)}\right ) \, dx\\ &=-\frac{\left (b^2 e^3 g^3 (b e f+b d g-3 a e g)-c^3 \left (e^4 f^4+d e^3 f^3 g+d^2 e^2 f^2 g^2+d^3 e f g^3+d^4 g^4\right )-3 c e^2 g^2 \left (a^2 e^2 g^2-2 a b e g (e f+d g)+b^2 \left (e^2 f^2+d e f g+d^2 g^2\right )\right )-3 c^2 e g \left (a e g \left (e^2 f^2+d e f g+d^2 g^2\right )-b \left (e^3 f^3+d e^2 f^2 g+d^2 e f g^2+d^3 g^3\right )\right )\right ) x}{e^5 g^5}+\frac{\left (b^3 e^3 g^3-3 b c e^2 g^2 (b e f+b d g-2 a e g)-c^3 \left (e^3 f^3+d e^2 f^2 g+d^2 e f g^2+d^3 g^3\right )-3 c^2 e g \left (a e g (e f+d g)-b \left (e^2 f^2+d e f g+d^2 g^2\right )\right )\right ) x^2}{2 e^4 g^4}+\frac{c \left (3 b^2 e^2 g^2-3 c e g (b e f+b d g-a e g)+c^2 \left (e^2 f^2+d e f g+d^2 g^2\right )\right ) x^3}{3 e^3 g^3}-\frac{c^2 (c e f+c d g-3 b e g) x^4}{4 e^2 g^2}+\frac{c^3 x^5}{5 e g}+\frac{\left (c d^2-b d e+a e^2\right )^3 \log (d+e x)}{e^6 (e f-d g)}-\frac{\left (c f^2-b f g+a g^2\right )^3 \log (f+g x)}{g^6 (e f-d g)}\\ \end{align*}
Mathematica [A] time = 0.465518, size = 476, normalized size = 0.9 \[ -\frac{e g x \left (-30 c e^2 g^2 (e f-d g) \left (6 a^2 e^2 g^2+6 a b e g (-2 d g-2 e f+e g x)+b^2 \left (6 d^2 g^2-3 d e g (g x-2 f)+e^2 \left (6 f^2-3 f g x+2 g^2 x^2\right )\right )\right )-30 b^2 e^3 g^3 (e f-d g) (6 a e g+b (-2 d g-2 e f+e g x))+15 c^2 e g \left (b \left (-4 d^2 e^2 g^4 x^2+6 d^3 e g^4 x-12 d^4 g^4+3 d e^3 g^4 x^3+e^4 f \left (-6 f^2 g x+12 f^3+4 f g^2 x^2-3 g^3 x^3\right )\right )-2 a e g (e f-d g) \left (6 d^2 g^2-3 d e g (g x-2 f)+e^2 \left (6 f^2-3 f g x+2 g^2 x^2\right )\right )\right )+c^3 \left (-15 d^2 e^3 g^5 x^3+20 d^3 e^2 g^5 x^2-30 d^4 e g^5 x+60 d^5 g^5+12 d e^4 g^5 x^4+e^5 f \left (-20 f^2 g^2 x^2+30 f^3 g x-60 f^4+15 f g^3 x^3-12 g^4 x^4\right )\right )\right )-60 g^6 \log (d+e x) \left (e (a e-b d)+c d^2\right )^3+60 e^6 \log (f+g x) \left (g (a g-b f)+c f^2\right )^3}{60 e^6 g^6 (e f-d g)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.068, size = 1232, normalized size = 2.3 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.03556, size = 973, normalized size = 1.83 \begin{align*} \frac{{\left (c^{3} d^{6} - 3 \, b c^{2} d^{5} e - 3 \, a^{2} b d e^{5} + a^{3} e^{6} + 3 \,{\left (b^{2} c + a c^{2}\right )} d^{4} e^{2} -{\left (b^{3} + 6 \, a b c\right )} d^{3} e^{3} + 3 \,{\left (a b^{2} + a^{2} c\right )} d^{2} e^{4}\right )} \log \left (e x + d\right )}{e^{7} f - d e^{6} g} - \frac{{\left (c^{3} f^{6} - 3 \, b c^{2} f^{5} g - 3 \, a^{2} b f g^{5} + a^{3} g^{6} + 3 \,{\left (b^{2} c + a c^{2}\right )} f^{4} g^{2} -{\left (b^{3} + 6 \, a b c\right )} f^{3} g^{3} + 3 \,{\left (a b^{2} + a^{2} c\right )} f^{2} g^{4}\right )} \log \left (g x + f\right )}{e f g^{6} - d g^{7}} + \frac{12 \, c^{3} e^{4} g^{4} x^{5} - 15 \,{\left (c^{3} e^{4} f g^{3} +{\left (c^{3} d e^{3} - 3 \, b c^{2} e^{4}\right )} g^{4}\right )} x^{4} + 20 \,{\left (c^{3} e^{4} f^{2} g^{2} +{\left (c^{3} d e^{3} - 3 \, b c^{2} e^{4}\right )} f g^{3} +{\left (c^{3} d^{2} e^{2} - 3 \, b c^{2} d e^{3} + 3 \,{\left (b^{2} c + a c^{2}\right )} e^{4}\right )} g^{4}\right )} x^{3} - 30 \,{\left (c^{3} e^{4} f^{3} g +{\left (c^{3} d e^{3} - 3 \, b c^{2} e^{4}\right )} f^{2} g^{2} +{\left (c^{3} d^{2} e^{2} - 3 \, b c^{2} d e^{3} + 3 \,{\left (b^{2} c + a c^{2}\right )} e^{4}\right )} f g^{3} +{\left (c^{3} d^{3} e - 3 \, b c^{2} d^{2} e^{2} + 3 \,{\left (b^{2} c + a c^{2}\right )} d e^{3} -{\left (b^{3} + 6 \, a b c\right )} e^{4}\right )} g^{4}\right )} x^{2} + 60 \,{\left (c^{3} e^{4} f^{4} +{\left (c^{3} d e^{3} - 3 \, b c^{2} e^{4}\right )} f^{3} g +{\left (c^{3} d^{2} e^{2} - 3 \, b c^{2} d e^{3} + 3 \,{\left (b^{2} c + a c^{2}\right )} e^{4}\right )} f^{2} g^{2} +{\left (c^{3} d^{3} e - 3 \, b c^{2} d^{2} e^{2} + 3 \,{\left (b^{2} c + a c^{2}\right )} d e^{3} -{\left (b^{3} + 6 \, a b c\right )} e^{4}\right )} f g^{3} +{\left (c^{3} d^{4} - 3 \, b c^{2} d^{3} e + 3 \,{\left (b^{2} c + a c^{2}\right )} d^{2} e^{2} -{\left (b^{3} + 6 \, a b c\right )} d e^{3} + 3 \,{\left (a b^{2} + a^{2} c\right )} e^{4}\right )} g^{4}\right )} x}{60 \, e^{5} g^{5}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 20.5178, size = 1465, normalized size = 2.76 \begin{align*} \frac{60 \,{\left (c^{3} d^{6} - 3 \, b c^{2} d^{5} e - 3 \, a^{2} b d e^{5} + a^{3} e^{6} + 3 \,{\left (b^{2} c + a c^{2}\right )} d^{4} e^{2} -{\left (b^{3} + 6 \, a b c\right )} d^{3} e^{3} + 3 \,{\left (a b^{2} + a^{2} c\right )} d^{2} e^{4}\right )} g^{6} \log \left (e x + d\right ) + 12 \,{\left (c^{3} e^{6} f g^{5} - c^{3} d e^{5} g^{6}\right )} x^{5} - 15 \,{\left (c^{3} e^{6} f^{2} g^{4} - 3 \, b c^{2} e^{6} f g^{5} -{\left (c^{3} d^{2} e^{4} - 3 \, b c^{2} d e^{5}\right )} g^{6}\right )} x^{4} + 20 \,{\left (c^{3} e^{6} f^{3} g^{3} - 3 \, b c^{2} e^{6} f^{2} g^{4} + 3 \,{\left (b^{2} c + a c^{2}\right )} e^{6} f g^{5} -{\left (c^{3} d^{3} e^{3} - 3 \, b c^{2} d^{2} e^{4} + 3 \,{\left (b^{2} c + a c^{2}\right )} d e^{5}\right )} g^{6}\right )} x^{3} - 30 \,{\left (c^{3} e^{6} f^{4} g^{2} - 3 \, b c^{2} e^{6} f^{3} g^{3} + 3 \,{\left (b^{2} c + a c^{2}\right )} e^{6} f^{2} g^{4} -{\left (b^{3} + 6 \, a b c\right )} e^{6} f g^{5} -{\left (c^{3} d^{4} e^{2} - 3 \, b c^{2} d^{3} e^{3} + 3 \,{\left (b^{2} c + a c^{2}\right )} d^{2} e^{4} -{\left (b^{3} + 6 \, a b c\right )} d e^{5}\right )} g^{6}\right )} x^{2} + 60 \,{\left (c^{3} e^{6} f^{5} g - 3 \, b c^{2} e^{6} f^{4} g^{2} + 3 \,{\left (b^{2} c + a c^{2}\right )} e^{6} f^{3} g^{3} -{\left (b^{3} + 6 \, a b c\right )} e^{6} f^{2} g^{4} + 3 \,{\left (a b^{2} + a^{2} c\right )} e^{6} f g^{5} -{\left (c^{3} d^{5} e - 3 \, b c^{2} d^{4} e^{2} + 3 \,{\left (b^{2} c + a c^{2}\right )} d^{3} e^{3} -{\left (b^{3} + 6 \, a b c\right )} d^{2} e^{4} + 3 \,{\left (a b^{2} + a^{2} c\right )} d e^{5}\right )} g^{6}\right )} x - 60 \,{\left (c^{3} e^{6} f^{6} - 3 \, b c^{2} e^{6} f^{5} g - 3 \, a^{2} b e^{6} f g^{5} + a^{3} e^{6} g^{6} + 3 \,{\left (b^{2} c + a c^{2}\right )} e^{6} f^{4} g^{2} -{\left (b^{3} + 6 \, a b c\right )} e^{6} f^{3} g^{3} + 3 \,{\left (a b^{2} + a^{2} c\right )} e^{6} f^{2} g^{4}\right )} \log \left (g x + f\right )}{60 \,{\left (e^{7} f g^{6} - d e^{6} g^{7}\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: NotImplementedError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]